package com.match.competition_apply.mapper;

import com.match.competition_apply.entity.CompetitionSignUp;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.match.entity.baseEntity.Student;
import com.match.entity.baseEntity.Teacher;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author AdiosF
 * @since 2021-11-03
 */
@Mapper
public interface CompetitionSignUpMapper extends BaseMapper<CompetitionSignUp> {

    //得到第一指导老师
    String getAdviserOne(String adviserOne);

    //得到队长的名字
    String getTeamLeaderName(String leaderNumber);

    //根据学生Id更新学生参赛信息
    void updateStudentCount(String studentNumber);

    //获取学生的参赛数
    int getStudentCount(String studentNumber);

    //根据学生Id更新学生参赛信息
    void updateStudentCountNumber(String studentNumber);

    //根据组别Id移除中间表信息
    void deleteNumberGroutByGroutId(String signUpId);

    //更新报名状态
    void updateSignUpStates(String signUpId, Integer states,String backInfo);

    //得到驳回信息
    String getBackInfo(String signUpId);

    //得到学生信息
    Student getStudent(String studentNumber);

    //得到教师信息
    Teacher getTeacher(String teacherNumber);

    //获取组别Id
    List<String> getStudentGroupId(String number);

    //获取每个学生是否已置换课程
    Integer getStudentReplace(String number, String id);
}
